package com.probiz.estore.core.hibernate.dialect;

import org.hibernate.Hibernate;
import org.hibernate.dialect.MySQLInnoDBDialect;
import org.hibernate.dialect.function.SQLFunctionTemplate;

public class MySQLInnoDBDialectInProbiz extends MySQLInnoDBDialect{
	public MySQLInnoDBDialectInProbiz() {
	       super();
	       //将utf8 转化为 gbk 编码
	       registerFunction("convert_gbk", new SQLFunctionTemplate(Hibernate.STRING, "convert(?1 using gbk)") );
	    }
}
